package com.sun.design.factory.simple;

import com.sun.design.factory.BenChi;
import com.sun.design.factory.Car;
import com.sun.design.factory.WuLing;

public class CarFactory {
    public static Car getCar(String car){
        switch (car){
            case "wuling":
                return new WuLing();
            case "benchi":
                return new BenChi();
            default:
                return null;
        }
    }
}
